<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%--
  Created by IntelliJ IDEA.
  User: zhangyiyi
  Date: 2025/3/3
  Time: 9:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Map map = new HashMap();
    map.put("name","tom");
    map.put("password","pwd123456");
    pageContext.setAttribute("user",map);
%>
输出Map集合中的元素：<br>
<c:forEach items="${user}" var="u">
    ${u.key}-->${u.value}<br>
</c:forEach>
</body>
</html>
